package util;

public class ByteMesasage {

	public byte[] bytes;
	
	public int offset;
	
	public int lenth;
	
	public ByteMesasage(ByteBuffer data)
	{
		ByteBuffer msg= new ByteBuffer(data.remaining()+4);
		msg.writeInt(data.remaining());
		msg.write(data.bytes,data.offset,data.remaining());
		this.bytes=msg.bytes;
		this.offset=msg.offset;
		this.lenth=msg.remaining();
	}
}
